package com.example;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

/**
 * @ClassName: leetcode
 * @Description:
 * @Author: csp
 * @Date:
 */
public class ZhenZe {
    public static void main(String[] args) {
//        Pattern pattern = Pattern.compile("\\w+");
//        String pattern1 = pattern.pattern();
//        Matcher matcher = pattern.matcher("\\w+");
//        matcher.replaceAll("");
//        System.out.println(pattern1);
        String regex = "$1[3579](\\d{9})";
        boolean a13760869872 = Pattern.matches(regex, "A13760869872");
        System.out.println(a13760869872);
        Pattern p = Pattern.compile(regex);
        Matcher m = p.matcher("A13760869872");
        while (m.find()) {
            System.out.println(m.group());
        }
        System.out.println(m.replaceAll("A"));
    }
}
